package com.settlement.system.model.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.settlement.system.common.util.StringUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import com.alibaba.excel.annotation.ExcelProperty;
import java.util.HashMap;
import java.util.Map;

/**
* <p>
* 微盟资金流水导入VO
* </p>
*
* @author huangrensen
* @since 2024-06-18
*/
@Schema
@Data
public class WmFundFlowImportVo implements Serializable {
    @ExcelIgnore
    private Long storeId;
    @ExcelProperty(value = "记账时间")
    private String billTime;
    @ExcelProperty(value = "微信支付业务单号")
    private String wxBusinessNo;
    @ExcelProperty(value = "资金流水单号")
    private String flowNo;
    @ExcelProperty(value = "业务名称")
    private String businessName;
    @ExcelProperty(value = "业务类型")
    private String businessType;
    @ExcelProperty(value = "收支类型")
    private String payType;
    @ExcelProperty(value = "收支金额(元)")
    private String incomeAmount;
    @ExcelProperty(value = "账户结余(元)")
    private String balanceAmount;
    @ExcelProperty(value = "资金变更提交申请人")
    private String applyPerson;
    @ExcelProperty(value = "备注")
    private String remark;
    @ExcelProperty(value = "业务凭证号")
    private String businessNo;

    @ExcelIgnore
    private String billMonth;

    @ExcelIgnore
    private String uuid;
    public static Map<String, String> getKeyMap(){
        Map<String, String> map = new HashMap<>();
        map.put("店铺ID", "storeId");
        map.put("记账时间", "billTime");
        map.put("微信支付业务单号", "wxBusinessNo");
        map.put("资金流水单号", "flowNo");
        map.put("业务名称", "businessName");
        map.put("业务类型", "businessType");
        map.put("收支类型", "payType");
        map.put("收支金额(元)", "incomeAmount");
        map.put("账户结余(元)", "balanceAmount");
        map.put("资金变更提交申请人", "applyPerson");
        map.put("备注", "remark");
        map.put("业务凭证号", "businessNo");
        return map;
    }

    public void clear() {
        if(StringUtils.hasText(this.billTime)){
            this.billTime = this.billTime.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.wxBusinessNo)){
            this.wxBusinessNo = this.wxBusinessNo.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.flowNo)){
            this.flowNo = this.flowNo.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.businessName)){
            this.businessName = this.businessName.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.businessType)){
            this.businessType = this.businessType.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.payType)){
            this.payType = this.payType.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.incomeAmount)){
            this.incomeAmount = this.incomeAmount.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.balanceAmount)){
            this.balanceAmount = this.balanceAmount.replace("`", "").strip();
        }
        if(StringUtils.hasText(this.businessNo)){
            this.businessNo = this.businessNo.replace("`", "").strip();
        }
    }
}
